import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    redirect: { path: "/home" },
  },
  {
    path: "/home",
    component: () => import("@/views/index/index.vue"),
    children:[
      {
        path: '/soundRecord',
        name: 'SoundRecord',
        component: () => import('../views/SoundRecord.vue')
      },
      {
        path: '/input',
        name: 'Input',
        component: () => import('../views/Input.vue')
      },
      {
        path: '/version',
        name: 'Version',
        component: () => import('../views/Version.vue')
      },
      {
        path: '/videoPlayer',
        name: 'VideoPlayer',
        component: () => import('../views/VideoPlayer.vue')
      },
      {
        path: '/video/xgPlayer',
        name: 'XgPlayer',
        component: () => import('../views/video/xgPlayer.vue')
      },
      {
        path: '/rtmp',
        name: 'Rtmp',
        component: () => import('../views/Rtmp.vue')
      },
      {
        path: '/components/division',
        name: 'DivisionView',
        component: () => import('../views/components/division.vue')
      },
      {
        path: '/components/barcode',
        name: 'Barcode',
        component: () => import('../views/components/barcode.vue')
      },
      {
        path: '/components/qrcode',
        name: 'Qrcode',
        component: () => import('../views/components/qrcode.vue')
      },
      {
        path: '/components/zDateRange',
        name: 'zDateRange',
        component: () => import('../views/components/zDateRange.vue')
      },
      {
        path: '/testForm',
        name: 'TestForm',
        component: () => import('../views/testForm.vue')
      },{
        path: '/rtsp',
        name: 'Rtsp',
        component: () => import('../views/rtsp.vue')
      },{
        path: '/video/videoJs',
        name: 'Videojs',
        component: () => import('../views/video/videoJs.vue')
      },{
        path: '/gundong',
        name: 'Gundong',
        component: () => import('../views/gundong.vue')
      },{
        path: '/table/mergeTableCell',
        name: 'MergeTableCell',
        component: () => import('../views/table/mergeTableCell.vue')
      },{
        path: '/tools',
        name: 'Tools',
        component: () => import('../views/tools/index.vue')
      },
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
